package com.foreknow.mapper;

import com.foreknow.entity.Department;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DepartmentMapper {
    /**
     * 获取科室分类的名称
     * @return
     */
    public List<Department> getDeptCategory();

    /**
     * 获取科室名称
     * @param deptCategoryId
     * @return
     */
    @Select("select * from department where DeptCategoryID = #{deptCategoryId}")
    public List<Department> deptListByType(Integer deptCategoryId);

    /**
     * id查科室
     * @param deptId
     * @return
     */
    @Select("select * from department where ID = #{deptId}")
    public Department getDepartmentById(Integer deptId);
}
